/**
 * ComponentDetailsAction.java
 *
 * Copyright (c) 2009 Prj.Manager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Prj.Manager .
 **/
package ro.prjmanager.web.actions;


import ro.prjmanager.web.annotation.Service;
import ro.prjmanager.web.annotation.NomenclatorTarget;
import ro.prjmanager.core.annotations.Id;
import ro.prjmanager.core.annotations.Column;
import ro.prjmanager.core.annotations.EditOptions;
import ro.prjmanager.core.annotations.List;
import ro.prjmanager.model.ComponentDetails;

@Service(target = "componentdetailsService")
@NomenclatorTarget(addTarget = "add",deleteTarget = "del",editTarget = "edit",
        resource = "/pages/nomenclators/componentdetails/componentdetails.jsp",
        onFaildReturn = "/pages/nomenclators/componentdetails/componentdetails.jsp")
@List(serviceName = "componentdetailsService",
        caption = "ComponentDetails List",
        editUrl = "%context_path%/actions/ComponentDetails.action",
        id = "1", height = 200, rowNum = 10,
        url = "%context_path%/componentdetails.lst")
public class ComponentDetailsAction extends GenericAction<ComponentDetails> {

    @Id
    private Long idL;

    @Column(name = "detail", caption = "DETAIL", index = "detail", width = 150, editOptions = @EditOptions(pos = 2  ,cols = 20, rows = 4, edittype = "textarea" ))
    private java.lang.String detail;

    @Column(name = "guiMenuPreffix", caption = "GUI MENU PREFFIX", index = "guiMenuPreffix", width = 150, editOptions = @EditOptions(pos = 3  ,cols = 20, rows = 4, edittype = "textarea" ))
    private java.lang.String guiMenuPreffix;

    @Column(name = "guiPathPreffix", caption = "GUI PATH PREFFIX", index = "guiPathPreffix", width = 150, editOptions = @EditOptions(pos = 4  ,cols = 20, rows = 4, edittype = "textarea" ))
    private java.lang.String guiPathPreffix;

    @Column(name = "menuLabel", caption = "MENU LABEL", index = "menuLabel", width = 150, editOptions = @EditOptions(pos = 5  ,cols = 20, rows = 4, edittype = "textarea" ))
    private java.lang.String menuLabel;

    @Column(name = "actionRelPack", caption = "ACTION REL PACK", index = "actionRelPack", width = 150, editOptions = @EditOptions(pos = 6  ,cols = 20, rows = 4, edittype = "textarea" ))
    private java.lang.String actionRelPack;

    public Long getIdL() {
        if(getId()!=null&&!getId().isEmpty()&&!getId().equals("_empty"))
          idL=Long.valueOf(getId());
        return idL;
    }

    public void setIdL(Long idL) {
        this.idL = idL;
        if(idL!=null)
            this.setId(String.valueOf(idL));
    }

    /**
     * This method gets the detail attribute
     * @return - an  java.lang.String  object
     **/
    public  java.lang.String  getDetail(){
        return this.detail;
    }

    /**
     * The setter for the detail attribute
     * @param detail -  an  java.lang.String  object
     **/
    public void setDetail( java.lang.String  detail){
        this.detail=detail;
    }
    /**
     * This method gets the guiMenuPreffix attribute
     * @return - an  java.lang.String  object
     **/
    public  java.lang.String  getGuiMenuPreffix(){
        return this.guiMenuPreffix;
    }

    /**
     * The setter for the guiMenuPreffix attribute
     * @param guiMenuPreffix -  an  java.lang.String  object
     **/
    public void setGuiMenuPreffix( java.lang.String  guiMenuPreffix){
        this.guiMenuPreffix=guiMenuPreffix;
    }
    /**
     * This method gets the guiPathPreffix attribute
     * @return - an  java.lang.String  object
     **/
    public  java.lang.String  getGuiPathPreffix(){
        return this.guiPathPreffix;
    }

    /**
     * The setter for the guiPathPreffix attribute
     * @param guiPathPreffix -  an  java.lang.String  object
     **/
    public void setGuiPathPreffix( java.lang.String  guiPathPreffix){
        this.guiPathPreffix=guiPathPreffix;
    }
    /**
     * This method gets the menuLabel attribute
     * @return - an  java.lang.String  object
     **/
    public  java.lang.String  getMenuLabel(){
        return this.menuLabel;
    }

    /**
     * The setter for the menuLabel attribute
     * @param menuLabel -  an  java.lang.String  object
     **/
    public void setMenuLabel( java.lang.String  menuLabel){
        this.menuLabel=menuLabel;
    }
    /**
     * This method gets the actionRelPack attribute
     * @return - an  java.lang.String  object
     **/
    public  java.lang.String  getActionRelPack(){
        return this.actionRelPack;
    }

    /**
     * The setter for the actionRelPack attribute
     * @param actionRelPack -  an  java.lang.String  object
     **/
    public void setActionRelPack( java.lang.String  actionRelPack){
        this.actionRelPack=actionRelPack;
    }


    public void add() {
        ComponentDetails adderObj=getModel();
        getService().create(adderObj);

    }
    public void edit() {
         ComponentDetails editObj=getModel();
        getService().update(editObj);
    }

}
